import request from "@/utils/request";

// 获取用户列表
export const getUserList = (data) => {
  return request({
    url: "/user/list",
    method: "post",
    data
  });
};

// 根据id查询单个用户信息
export const getOneUserInfo = (data) => {
  return request({
    url: "/user/get",
    method: "post",
    data
  });
};

// 新增用户
export const addUser = (data) => {
  return request({
    url: "/user/add",
    method: "post",
    data
  });
};

// 修改用户
export const editUser = (data) => {
  return request({
    url: "/user/update",
    method: "post",
    data
  });
};

// 删除用户
export const removeUser = (data) => {
  return request({
    url: "/user/delete",
    method: "post",
    data
  });
};

// 重置用户密码
export const resetPasswd = (data) => {
  return request({
    url: "/user/resetPassword",
    method: "post",
    data
  });
};

// 修改用户密码
export const editPasswd = (data) => {
  return request({
    url: "/user/editPassword",
    method: "post",
    data
  });
};
